package com.nowcoder.community.service;

import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * @author 夏智力
 * @FileName AlphaService
 * @date 2021/5/28 14:23
 * @Software: IntelliJ IDEA
 */
@Service
public class AlphaService {

    public AlphaService() {
        System.out.println("实例化AlphaService");
    }

    //@PostConstruct注解表示会在构造器之后调用
    @PostConstruct
    public void init() {
        System.out.println("初始化AlphaService");
    }

    @PreDestroy
    public void destroy() {
        System.out.println("销毁AlphaService");
    }
}
